window.onload=()=>{
    let btn=document.querySelector("button")
    let btn_post=document.querySelector("#btn_post")
    btn.addEventListener("click",(e)=>{
        e.preventDefault()
        let user = document.getElementById("username").value
        let pass= document.getElementById("password").value 
        axios.get("http://172.19.1.251:8080/login",{
            param:{
                username:user,
                password:pass
            }
        }).then((res)=>{
            console.log(res.data)
        })
    })



    btn_post.addEventListener("click",(e)=>{
        e.preventDefault()
        let user = document.getElementById("username").value
        let pass= document.getElementById("password").value 
        axios.post("http://172.19.1.251:8080/login",{
            param:{
                username:user,
                password:pass
            }
        }).then((res)=>{
            console.log(res.data)
        })
    })
}